package com.three.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 积分
 * @TableName tb_user_integral
 */
@TableName(value ="tb_user_integral")
@Data
public class UserIntegral implements Serializable {
    /**
     * 积分ID
     */
    @TableId(type = IdType.AUTO)
    private Integer integralId;

    /**
     * 用户ID，外键关联用户表
     */
    private Integer userId;

    /**
     * 积分数值
     */
    private Integer credits;

    /**
     * 积分来源
     */
    private String source;

    /**
     * 积分记录创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime integralTime;

    /**
     * 店铺id
     */
    private Integer storeId;

    private FrontUser frontUser;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}